home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mflzt.exe / MFLOCALE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-22  |  3.6 KB  |  119 lines

  1. /************************************************************************/
  2. /*                                                                      */
  3. /*  LOCALE Header file                                                  */
  4. /*                                                                      */
  5. /*  Draft ANSI-spec header for country-specific information.            */
  6. /*                                                                      */
  7. /*  Copyright 1989 by Robert B. Stout dba MicroFirm                     */
  8. /*  All rights reserved                                                 */
  9. /*                                                                      */
  10. /*  Compiled by and for use with Zortech C/C++ 1.07 or later.           */
  11. /*                                                                      */
  12. /************************************************************************/
  13.  
  14. #include <stdarg.h>
  15.  
  16. #ifndef LOCALE_H
  17. #define LOCALE_H
  18.  
  19. #define LC_ALL          0
  20. #define LC_COLLATE      1
  21. #define LC_CTYPE        2
  22. #define LC_MONETARY     3
  23. #define LC_NUMERIC      4
  24. #define LC_TIME         5
  25.  
  26. /************************************************************************/
  27. /*                                                                      */
  28. /*  Set up enumerated data types for locales and date ordering -        */
  29. /*  provide a default locale.                                           */
  30. /*                                                                      */
  31. /************************************************************************/
  32.  
  33. typedef enum {_C_, USA, MAX_LOC} _locale_loc;
  34.  
  35. #define LOC_DEFAULT USA
  36.  
  37. /*
  38. **  ANSI-specified locale definition structure
  39. */
  40.  
  41. struct lconv {
  42.                 char    *s_all;
  43.  
  44.                 char    *s_collate;
  45.  
  46.                 char    *s_ctype;
  47.  
  48.                 char    *s_monetary;
  49.                 char    *currency_symbol;
  50.                 char    *int_curr_symbol;
  51.                 char    *mon_decimal_point;
  52.                 char    *mon_thousands_sep;
  53.                 char    *mon_grouping;
  54.                 char    *positive_sign;
  55.                 char    *negative_sign;
  56.                 char    int_frac_digits;
  57.                 char    frac_digits;
  58.                 char    p_cs_precedes;
  59.                 char    n_cs_precedes;
  60.                 char    p_sep_by_space;
  61.                 char    n_sep_by_space;
  62.                 char    p_sign_posn;
  63.                 char    n_sign_posn;
  64.  
  65.                 char    *s_numeric;
  66.                 char    *decimal_point;
  67.                 char    *thousands_sep;
  68.                 char    *grouping;
  69.  
  70.                 char    *s_time;
  71.                 char    *day[7][2];
  72.                 char    *month[12][2];
  73.                 int     TZ_secs;
  74.                 int     DST_flag;
  75.                 char    *TZ_txt[2];
  76.                 char    tim_sep;
  77.                 char    *p_FMTA;
  78.                 char    *p_FMTP;
  79.                 char    *c_FORMAT;
  80.                 char    *x_FORMAT;
  81.                 char    *X_FORMAT;
  82.         char    fmt_24;
  83.         };
  84.  
  85. /*
  86. **  ANSI-mandated locale-related functions
  87. */
  88.  
  89. #ifndef _Cdecl_
  90.  #if __ZTC__ > 0x107
  91.   #define CONST__ const
  92.   #ifdef __STDC__
  93.    #define _Cdecl_
  94.   #else
  95.    #define _Cdecl_ cdecl
  96.   #endif
  97.  #else
  98.   #define CONST__
  99.   #define _Cdecl_
  100.  #endif
  101. #endif
  102.  
  103. #if __ZTC__ > 0x107
  104.  #if __cplusplus
  105.   extern "C" {
  106.  #endif
  107. #endif
  108.  
  109. char         * _Cdecl_ setlocale(int, const char *);
  110. struct lconv * _Cdecl_ localeconv(void);
  111.  
  112. #if __ZTC__ > 0x107
  113.  #if __cplusplus
  114.   }
  115.  #endif
  116. #endif
  117.  
  118. #endif
  119.